package cn.chendd.api.client;

import cn.chendd.api.config.FeatiresFeignConfiguration;
import cn.chendd.api.config.OpenFeignFeaturesClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.awt.*;
import java.util.List;

/**
 * Open Feign 特性功能点验证
 * @author chendd
 * @date 2023/1/14 15:58
 */
@FeignClient(
        //微服务名称
        name = "chendd-gateway" ,
        //url路径，可替换name属性
        //url = "",
        //接口根路径
        path = "/nacos-client/hello" ,
        //自定义配置（日志级别、拦截器、url路径覆盖）
        configuration = FeatiresFeignConfiguration.class ,
        //错误处理器，推荐使用fallbackFactory，fallback无法获取到异常堆栈
        //fallback = OpenFeignFeaturesClientFallback.class
        fallbackFactory = OpenFeignFeaturesClientFallbackFactory.class
)
public interface OpenFeignFeaturesClient {

    /**
     * 获取数据列表
     * @return 数据列表
     */
    @GetMapping(value = "/list")
    List<Point> getList();

}
